package bb.lanxing.calc.data;

public class PowerratePoint implements Cloneable, RecycleData {
    private int powerrate;
    private int source = 2;

    public PowerratePoint copy(PowerratePoint reuse) {
        if (reuse == null) {
            reuse = new PowerratePoint();
        }
        reuse.powerrate = this.powerrate;
        reuse.source = this.source;
        return reuse;
    }

    public PowerratePoint clone() {
        try {
            return (PowerratePoint) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
            return null;
        }
    }

    @Override
    public void recycle() {
        this.powerrate = 0;
        this.source = 2;
    }

    public int getPowerrate() {
        return this.powerrate;
    }

    public void setPowerrate(int powerrate) {
        this.powerrate = powerrate;
    }

    public int getSource() {
        return this.source;
    }

    public void setSource(int source) {
        this.source = source;
    }
}
